package com.gzsxy.builder.demo;

/**
 * @author xiaolong
 * @version 1.0
 * @description: 具体的建造者：工人
 * @date 2022/4/10 21:49
 */
public class Worker extends Builder{
    private Product product;

    public Worker() {
        product = new Product();
    }

    @Override
    void buildA() {
        product.setBuildA("地基");
        System.out.println("地基");
    }

    @Override
    void buildB() {
        product.setBuildB("钢筋水泥");
        System.out.println("钢筋水泥");
    }

    @Override
    void buildC() {
        product.setBuildB("铺电线");
        System.out.println("铺电线");
    }

    @Override
    void buildD() {
        product.setBuildB("粉刷");
        System.out.println("粉刷");
    }

    @Override
    Product getProduct() {
        return product;
    }
}
